define('restTemplate',['httpClient','httpClientRequestInterceptor','httpClientResponseInterceptor','siteConfig'], 
function (HttpClient,HttpClientRequestInterceptor,HttpClientResponseInterceptor,siteConfig) {
    //请求拦截器
    var requestInterceptor=new HttpClientRequestInterceptor(function(config,options){
        config.headers['x-author'] = 'wuxie QQ:16349023';
        config.headers['Authorization'] = 'Bearer aaaaaaaaaaaaaaaaaaa'
        return config;
      },function(error,options){
        return Promise.reject(error);        
      });
      //响应拦截器
      var responseInterceptor=new HttpClientResponseInterceptor(function(response,options){
        return response.data;
      },function(error,options){
        return Promise.reject(error);        
      });
      var httpClient=new HttpClient({
        baseURL: siteConfig.service.baseURL,
        timeout: siteConfig.service.timeout,
        headers: siteConfig.service.headers,
        requestInterceptor,
        responseInterceptor});
    return httpClient
  })